package nc.ui.yll.query;

import java.awt.Container;

import nc.ui.ic.pub.query.QueryConditionBaseDLG;
import nc.ui.pub.query.QueryConditionClient;
import nc.ui.querytemplate.QueryConditionDLG;
import nc.ui.scm.pub.sourceref.IBillReferQueryProxy;
import nc.ui.scm.so.SaleBillType;
import nc.vo.querytemplate.TemplateInfo;

public class SaleOrderBillReferQueryProxy extends IBillReferQueryProxy {

	public SaleOrderBillReferQueryProxy() {
	}

	public SaleOrderBillReferQueryProxy(Container parent, TemplateInfo ti) {
		super(parent, ti);
	}

	public SaleOrderBillReferQueryProxy(Container parent) {
		super(parent);
	}

	@Override
	public QueryConditionDLG createNewQryDlg() {
		return null;
	}

	@Override
	public QueryConditionClient createOldQryDlg() {
		/*
		 * if(getSourceBilltype().equals(SaleBillType.SaleOrder)){
		 *  }
		 */
		SaleOrderQuery dlg = new SaleOrderQuery(getContainer());
		dlg.initData(getPkCorp(), getOperator(), getNodeKey(),
				getBusinessType(), getCurrentBillType(), getSourceBilltype(),
				getUserObj());
		dlg.setBillRefModeSelPanel(true);
		return dlg;
	}
	
    public nc.vo.pub.query.ConditionVO[] getConditionVO() {
    	return getOldQryDlg().getConditionVO();
    }

    public void clearConditionVO(){
    	((SaleOrderQuery)getOldQryDlg()).clearConditionVO();
    }
    
	@Override
	public boolean isNewQryDlg() {
		return false;
	}

	@Override
	public boolean isShowDoubleTableRef() {
    return ((SaleOrderQuery)getOldQryDlg()).isShowDoubleTableRef();
	}

	@Override
	public void setUserRefShowMode(boolean isShowDoubleTableRef) {
    ((SaleOrderQuery)getOldQryDlg()).setBillRefShowMode(isShowDoubleTableRef) ;
	}

}
